<?php 

class Add_Validate_Setup_Profile_SavePost_Nickname extends Ext_Validate_Abstract
{
    protected $_nickname;
    
    public function __construct($nickname)
    {
        $this->_nickname  = $nickname;
    }
    
    public function isValid()
    {
        $validatorChain = new Zend_Validate();
        $validatorChain
            ->addValidator(new Zend_Validate_NotEmpty(), true)
            ;
        
        if(!$validatorChain->isValid($this->_nickname)) {
            $this->addTitleMessages('Nickname', $validatorChain->getMessages());
            return false;
        }
        
        return true;
    }
}
